﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="~{template}">
<head>
    <title>登录</title>
</head>
<body>

<div class="row" layout:fragment="content">
    <div class="form-wrapper col-lg-6 col-md-8 col-sm-8 col-lg-offset-4 col-md-offset-2 col-sm-offset-2">
        <h2>登录</h2><br/>
        <form id="login_form" class="form-horizontal" role="form" @submit.prevent="login">
            <div class="form-group">
                <div class="input-group col-lg-6 col-md-8 col-sm-8">
                    <div class="input-group-addon">&nbsp;账&nbsp;&nbsp;号&nbsp;</div>
                    <input type="text" class="form-control" placeholder="卡号" id="username"
                           v-model="accountModel.card" minlength="6" maxlength="32" required/>
                </div>
            </div>
            <div class="form-group">
                <div class="input-group col-lg-6 col-md-8 col-sm-8">
                    <div class="input-group-addon">&nbsp;密&nbsp;&nbsp;码&nbsp;</div>
                    <input type="password" class="form-control" placeholder="密码" id="password"
                           v-model="accountModel.password" minlength="6" maxlength="32" required/>
                </div>
            </div>
            <div class="form-group">
                <div class="row">
                    <div class="col-md-6 col-sm-4">
                        <button type="submit" class="btn btn-info btn-lg">登录</button>
                        <a href="#" class="register btn btn-primary" role="button" th:href="@{/view/register}">没有账号</a>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div layout:fragment="script">
<script src="../static/assets/libs/vue-resource/1.3.4/vue-resource.min.js"
        th:src="@{/assets/libs/vue-resource/1.3.4/vue-resource.min.js}"></script>
<script src="../static/assets/libs/js-cookie/2.1.4/js.cookie.min.js"
        th:src="@{/assets/libs/js-cookie/2.1.4/js.cookie.min.js}"></script>

<script src="../static/assets/js/login.js" th:src="@{/assets/js/login.js}"></script>
</div>
</body>
</html>
